<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="/common/head :: head" />
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>用户管理</h5>
            </div>
            <div class="ibox-content">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <div class="row">
                            <div class="col-lg-2 col-sm-3">
                                <div class="panel panel-default">
                                    <div class="panel-heading">组织机构</div>
                                    <div class="panel-body dept-tree">
                                        <ul id="deptTree" class="ztree"></ul>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-10 col-sm-9">
                                <div class="row">
                                    <div class="col-lg-12 col-sm-9">
                                        <div class="row">
                                            <div class="col-lg-3 col-sm-12">
                                                <div class="input-group">
                                                    <div class="input-group-btn">
                                                        <button data-toggle="dropdown"
                                                            class="btn btn-white dropdown-toggle" type="button">用户名称
                                                        </button>
                                                    </div>
                                                    <input type="text" class="form-control" id="condition" placeholder="帐号/姓名/手机号">
                                                </div>
                                            </div>
                                            <div class="col-lg-2 col-sm-6">
                                                <div class="input-group">
                                                    <div class="input-group-btn">
                                                        <button data-toggle="dropdown"
                                                            class="btn btn-white dropdown-toggle" type="button">用户状态
                                                        </button>
                                                    </div>
                                                    <select class="form-control" id="status">
                                                        <option value="0"></option>
                                                        <option value="1">启用</option>
                                                        <option value="2">冻结</option>
                                                        <option value="3">删除</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="col-lg-4 col-sm-6">
                                                <button type="button" class="btn btn-primary" onclick="User.search()" >
                                                    <i class="fa fa-search"></i>&nbsp;搜索
                                                </button>
                                                <button type="button" class="btn btn-primary button-margin" onclick="User.resetSearch()" >
                                                    <i class="fa fa-trash"></i>&nbsp;重置
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="hidden-xs" id="userTableToolbar" role="group">
                                    <button type="button" class="btn btn-primary" shiro:hasPermission ="/user/to_add" onclick="User.openAddUser()">
                                        <i class="fa fa-plus"></i>&nbsp;添加
                                    </button>
                                    <button type="button" class="btn btn-primary button-margin" shiro:hasPermission ="/user/to_update" onclick="User.openEditUser()">
                                        <i class="fa fa-edit"></i>&nbsp;修改
                                    </button>
                                    <button type="button" class="btn btn-primary button-margin" shiro:hasPermission ="/user/remove" onclick="User.deleteUser()">
                                        <i class="fa fa-remove"></i>&nbsp;删除
                                    </button>
                                    <button type="button" class="btn btn-primary button-margin" shiro:hasPermission ="/user/resetPwd" onclick="User.resetUserPwd()">
                                        <i class="fa fa-refresh"></i>&nbsp;重置密码
                                    </button>
                                    <button type="button" class="btn btn-primary button-margin" shiro:hasPermission ="/user/freeze" onclick="User.freezeUser()">
                                        <i class="fa fa-warning"></i>&nbsp;冻结
                                    </button>
                                    <button type="button" class="btn btn-primary button-margin" shiro:hasPermission ="/user/unfreeze" onclick="User.unfreezeUser()">
                                        <i class="fa fa-check-circle"></i>&nbsp;解除冻结
                                    </button>
                                    <button type="button" class="btn btn-primary button-margin" shiro:hasPermission ="/user/to_roleAssign" onclick="User.openEditUserRole()">
                                        <i class="fa fa-user-secret"></i>&nbsp;角色分配
                                    </button>
                                    <button type="button" class="btn btn-primary button-margin" shiro:hasPermission ="/user/to_appAssign" onclick="User.openEditUserApp()">
                                        <i class="fa fa-user-secret"></i>&nbsp;应用分配
                                    </button>
                                </div>
                                <table id="userTable" data-mobile-responsive="true"
                                    data-click-to-select="true">
                                    <thead>
                                        <tr>
                                            <th data-field="selectItem" data-checkbox="true"></th>
                                        </tr>
                                    </thead>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<footer th:replace="/common/footer :: footer"></footer>
<script th:src="@{/js/system/user/user.js}"></script>
</body>
</html>